@extends('layouts.back_stage')
@section('content')
    <div class="container">
        <div class="form-group" style="margin-top:50px;font-size: 15px;">
            <p><h3>设置财务总收入的比例:</h3></p>
            <input style="width:250px;margin:30px 0 30px 30px;;" type="text" placeholder="默认比例:0.01(两位小数)" id="scale"><br/>
            <button style="margin-left:30px;" class="btn btn-success" onclick="setScale()">确定</button>
        </div>

    </div>
    <script>
        function setScale() {
            var scale = $('#scale').val();
            $.ajax({
                headers: {
                    'X-CSRF-TOKEN': $('meta[name="csrf_token"]').attr('content')
                },
                url:'/finance/updateScale',
                type:'post',
                data:{
                    'scale':scale
                },
                dataType:'json',
                success:function (data) {
                    alert(data.msg);
                }
            })
        }
    </script>
@endsection